package jvm.heap;

import pattern.User;

public class EscapeAnalysis {
    public static void main(String[] args) {
        long start=System.currentTimeMillis();
        for (int i = 0; i < 1000000; i++) {
            alloc();
        }
        long end=System.currentTimeMillis();
        System.out.println("花费的时间为："+(end-start)+"ms");

        try {
            Thread.sleep(1000000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    private static void alloc(){
        User user=new User();
    }
}
